package com.sykj.bsc.cl.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sykj.bsc.hyx.service.Bis_opinionService;
import com.sykj.bsc.jhy.service.serviceImpl.Bis_nurse_projectServiceImpl;
import com.sykj.bsc.wsy.model.Bis_coupon_record;
import com.sykj.bsc.wsy.service.Bis_beauty_configService;
import com.sykj.bsc.zjj.bean.Bis_custom_user;
import com.sykj.bsc.zjj.service.Bis_shop_userService;
import com.sykj.bsc.zn.service.znServiceImpl;

@Controller
@RequestMapping("wechat")
public class CentoController {
	//胡颖箫hyx
	@Autowired
	public Bis_opinionService bis_opinionService;
	//王舒雅 wsy
	@Autowired
	Bis_beauty_configService service;
	//张俊杰 zjj
	@Autowired
	private Bis_shop_userService bsus;
	//江海阳 jhy
	@Autowired 
	Bis_nurse_projectServiceImpl impl;
	//张诺 zn
	@Autowired
	znServiceImpl sus;
	
	//收藏店铺
	@RequestMapping("/GobeOrder")
	@ResponseBody
	public String GobeOrder(@RequestParam(value="shop_id")String shop_id,HttpSession session){
		Bis_custom_user ss=(Bis_custom_user) session.getAttribute("user");
		Map<String, Object> map=new HashMap<>();
		map.put("custom_user_id", ss.getCustom_user_id());
		map.put("shop_id", shop_id);
		this.bis_opinionService.saveBis_shop_collect(map);
		return "1";
	}
	
	@RequestMapping("/cdkey")
	@ResponseBody
	public List<Bis_coupon_record> cdkey(@RequestParam(value="mobile")String mobile) {
		List<Bis_coupon_record> list=service.selectBis_coupon_record1(mobile);
			return list;
	}
	
}
